package edu.hawaii.wicket;

import org.apache.wicket.Application;
import org.apache.wicket.Page;
import org.apache.wicket.Request;
import org.apache.wicket.Response;
import org.apache.wicket.Session;
import org.apache.wicket.protocol.http.WebApplication;

import edu.hawaii.wicket.page.login.LoginPage;

/**
 * This top-level class is required to specify the Wicket WebApplication. 
 * @author Philip Johnson
 */
public class ExampleApplication extends WebApplication {
  
  /**
   * Return the home page for this application. 
   * @return The home page. 
   */
  @Override
  public Class<? extends Page> getHomePage() {
    return LoginPage.class;
  }
  
  /**
   * Return a session object to hold the models for each user of this application.
   * @param request The http request.
   * @param response The http response. 
   * @return The session instance for this user. 
   */
  @Override
  public Session newSession(Request request, Response response) {
    return new ExampleApplicationSession(this, request);
  }

  @Override
  public String getConfigurationType() {
    return Application.DEPLOYMENT;
  }
}
